<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@page session="true"%>
<%@page import="com.webapp.model.User"%>
<%@page import="com.webapp.model.Application,java.util.Vector;" %>
<%
	User user = (User) session.getAttribute("UserObject");
	if (user != null)
		System.out.println(user.getUserName());

	Application app = (Application) session.getAttribute("Application");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>GARS-Applicant's AY Application</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<style type="text/css">
			body { font-size: 95%; font-family: 'Open Sans'; padding:0; margin:0; background-color:#fff;}
			h1 { padding:0; margin:0; }
			h2 { padding:0; margin:0; }
			.sign_on_btn { background-color: #CC0000; color: #fff; border: 1px solid #990000; padding: 5px; cursor:pointer!important;}
			.sign_on_btn:hover { background-color:red; }
			.txtbox { background-color:#fff; border: 1px solid #ccc; width: 30px; }<br />
			.txtbox:focus { border: 1px soild #CC0000; }
			a { color: blue; }
			#top_of_site { padding: 5px;color: #333; background-color: #333; color:#fff; border: 1px solid #000;}
			#top_of_site h1 { padding:0; margin:0; font-size: 90%; }
			#wrapper { padding: 15px; }
			#login { width: 300px; margin: 0px auto 0px auto; padding: 10px;background-color: #333; color:#fff; border: 1px solid #000; }
			#info_bar { text-align:right; }
			#menu_container { width: 560px; margin: 30px auto 0px auto;  overflow:auto;}
			#behaviorcontainer { float:left; width: 400px; overflow:auto; }
			#extra_info { width: 560px; margin: 30px auto 0px auto;}
			#menu_container a { text-decoration: none; color: #fff; }
			#logout { float:left; background-color:#f2f2f2; border: 1px solid #ccc; color:#333; width: 100px; padding: 59px 15px 59px 15px; margin: 5px; }
			#viewTable { background-color:#0066CC; border: 1px solid #0066FF; width: 350px; padding: 20px; margin: 5px; }
			#submitApp { background-color:#B22222; border: 1px solid #990000; width: 350px; padding: 20px; margin: 5px; } 
			#apptable td { padding: 5px; }
			.even { background-color:#fff; padding:10px; cursor:pointer!important; }
			.odd { background-color:#ccc; padding:10px;cursor:pointer!important; }
			.even:hover { background-color: #0066CC; color: #fff; cursor:pointer!important; }
			.odd:hover { background-color: #0066CC; color:#fff;cursor:pointer!important;  }
			
			.form { font-size: 15px; margin-left:auto; margin-right:auto; width:5%; background-color:#b0e0e6;}
			.okay_button{font-size: 20px; margin-left:auto; margin-right:auto; width:10%; background-color:#b0e0e6;}
			.btn { background-color: #CC0000; color: #fff; border: 1px solid #990000; padding: 5px; cursor:pointer!important;}
			.btn:hover { background-color:red; }
</style>
</head>

<body>
	<div id="top_of_site">
		<h1>Graduate Application Review System (GARS)</h1>
	</div>

	<div id="wrapper">
		<form name="return" action="viewSingleAppsTest.jsp" method="get">
					<!-- Returns to the previous page, which would be the view table page.-->
					<input type="submit" value="Finished Viewing" class="btn">
				</form>
		<div id="info_bar">
			<p style="padding:0; margin:0;">Welcome, <strong><%= user.getUserName() %></strong>! You are a <strong><%= user.getType()  %></strong> member! </p>
             <p> You have <strong><%= user.getReviews()%></strong> reviews waiting to be reviewed! <br/><a href="ViewUserApp.do">Review Now!</a></p>
		</div>

		<div id="content">
			<h1>Applicant's AY File</h1>
			<h3>(Last Updated: <%=app.getUploadDate()%>)</h3>

			<!-- Represents general information about the applicant in AY file -->
			<div id="ay_general_info">
				<hr>
				<h3>
					<u>Applicant's General Information</u>
				</h3>
				<table border="0" width="1100" cellpadding="3" cellspacing="3">
					<tr>
						<td><b>First Name:</b> <i><%=app.getFirstName()%></i>
						</td>

						<td><b>Last Name:</b> <i><%=app.getLastName()%></i>
						<td><b>Middle Name:</b> <i><%=app.getMiddleName()%></i>
					</tr>

					<tr>
						<td><b>Birth Date:</b> <i><%=app.getBirthMonth() + "/" + app.getBirthDay() + "/" + app.getBirthYear()%></i>
						</td>

						<td><b>Sex:</b> <i><%=app.getGender()%></i>
						</td>

						<td><b>Ethnicity:</b> <i><%=app.getEthnicity()%></i>
						</td>
					</tr>

					<tr>
						<td><b>Race:</b> <i><%=app.getRace()%></i>
						</td>

						<td><b>Citizenship:</b> <i><%=app.getCitizenship()%></i>
						</td>

						<td><b>Permanent Resident:</b> <i><%=app.getpPermanentResident()%></i>
						</td>

					</tr>
					<td><b>Phone Number:</b> <i><%=app.getPhone()%></i>
					</td>

					<td><b>E-Mail:</b> <i><%=app.getEmail()%></i>
					</td>

					<!-- Fix This -->
					<td><b>Application Type:</b> <i>Computer Science</i>
					</td>
					<tr>
				</table>
			</div>

			<div id="ay_education_background">
				<hr>
				<h3>
					<u>Applicant's Educational Background</u>
				</h3>

				<div id="undergrad_institution">
					<h4>
						Undergraduate Institution: <i><u><%=app.getUgInst()%></u> </i>
					</h4>

					<table border="0" width="700" cellpadding="3" cellspacing="3">
						<tr>
							<td><b>Undergraduate GPA:</b> <i><%=app.getUgGpa()%></i>
							</td>

							<td><b>GPA Scale:</b> <i><%=app.getUgScale()%></i>
							</td>
						</tr>

						<tr>
							<td><b>Year 1 GPA:</b> <i><%=app.getUgGpa1()%></i>
							</td>

							<td><b>Year 2 GPA:</b> <i><%=app.getUgGpa2()%></i>
							</td>

							<td><b>Year 3 GPA:</b> <i><%=app.getUgGpa3()%></i>
							</td>

							<td><b>Year 4 GPA:</b> <i><%=app.getUgGpa4()%></i>
							</td>

							<td><b>Year 5 GPA</b> <i><%=app.getUgGpa5()%></i>
							</td>
						</tr>

						<tr>
							<td><b>Undergraduate Rank:</b> <i><%=app.getUgRank()%></i>
							</td>

							<td><b>Out Of:</b> <i><%=app.getUgRankOutOf()%></i>
							</td>
						</tr>
					</table>
				</div>

				<div id="grad_institution">
					<h4>
						Graduate Institution: <i><u><%=app.getGradInst()%></u> </i>
					</h4>
					<table border="0" width="350" cellpadding="3" cellspacing="3">

						<tr>
							<td><b>Graduate GPA:</b> <i><%=app.getGradGpa()%></i>
							</td>

							<td><b>GPA Scale:</b> <i><%=app.getGradScale()%></i>
							</td>
						</tr>

						<tr>
							<td><b>Year 6 GPA:</b> <i><%=app.getGradGpa1()%></i>
							</td>

							<td><b>Year 7 GPA:</b> <i><%=app.getGradGpa2()%></i>
							</td>
						</tr>

						<tr>
							<td><b>Graduate Rank:</b> <i><%=app.getGradRank()%></i>
							</td>

							<td><b>Out Of:</b> <i><%=app.getGradRankOutOf()%></i>
							</td>
						</tr>
					</table>


					<div id="courses">
						<h4>Courses Taken:</h4>

						<table border="0" width="1200" cellpadding="3" cellspacing="3">
							<tr>
								<td><b>Theory:</b> <i><%=app.getTheoryCouseTitle()%></i>
								</td>
								
								<td><b>Theory Grade:</b> <i><%=app.getTheoryGrade()%></i>
								</td>
								
								<td><b>Theory Grade Scale:</b> <i><%=app.getTheoryScale()%></i>
								</td>

								<td><b>SBU's Equivalent:</b> <i><%=app.getTheorySbuEquiv()%></i>
								</td>
							</tr>

							<tr>
								<td><b>Algorithms:</b> <i><%=app.getAlgorithmCourseTitle()%></i>
								</td>

								<td><b>Algorithm Grade:</b> <i><%=app.getAlgorithmGrade()%></i>
								</td>

								<td><b>Algorithms Grade Scale:</b> <i><%=app.getAlgorithmScale() %></i>
								</td>

								<td><b>SBU's Equivalent:</b> <i><%=app.getAlgorithmSbuEquiv()%></i>
								</td>
							</tr>

							<tr>
								<td><b>PL/Compilers:</b> <i><%=app.getProgLangCourseTitle()%></i>
								</td>

								<td><b>PL/Compliers Grade:</b> <i><%=app.getProgLangGrade() %></i>
								</td>
								
								<td><b>PL/Compliers Grade Scale:</b> <i><%=app.getProgLangScale()%></i>
								</td>

								<td><b>SBU's Equivalent:</b> <i><%=app.getProgLangSbuEquiv()%></i>
								</td>
							</tr>

							<tr>
								<td><b>Operating Systems:</b> <i><%=app.getOsCourseTitle()%></i>
								</td>
									
								<td><b>Operating Systems Grade:</b> <i><%=app.getOsGrade()%></i>
								</td>
								
								<td><b>Operating Systems Grade Scale:</b> <i><%=app.getOsScale()%></i>
								</td>

								<td><b>SBU's Equivalent:</b> <i><%=app.getOsSbuEquiv()%></i>
								</td>
							</tr>
						</table>

						<div id="research">
							<h4>Research Study:</h4>

							<label><b>Research Area:</b> </label> <i><%=app.getResearchArea()%></i> 
							<br>
							<label><b>Research Topic:</b> </label><i><%=app.getResearchTopic()%></i>
						</div>

						<div id="test_scores">
							<hr>
							<h3>
								<u>Applicant's Test Scores (GRE/TOELF)</u>
							</h3>
							<h4>GRE Scores:</h4>

							<table border="0" width=550 " cellpadding="3" cellspacing="3">
								<tr>
									<td><b>GRE Verbal Score:</b> <%=app.getGreV() %></td>

									<td><b>GRE Verbal Percentile</b> <%=app.getGreVPctile()%></td>
								</tr>

								<tr>
									<td><b>GRE Quantitative Score:</b> <%=app.getGreQ()%></td>

									<td><b>GRE Quantitative Percentile:</b> <%=app.getGreQPctile()%></td>
								</tr>

								<tr>
									<td><b>GRE Analytical Score:</b> <%=app.getGreA()%></td>

									<td><b>GRE Analytical Percentile:</b> <%=app.getGreAPctile()%></td>
								</tr>

								<tr>
									<td><b>GRE Test Taken:</b> <%=app.getGreSubjName()%></td>

									<td><b>GRE Test Score:</b> <%=app.getGreSubjScore()%></td>
								</tr>
							</table>

							<h4>TOELF Scores:</h4>

							<table border="0" width=500 " cellpadding="3" cellspacing="3">
								<tr>
									<td><b>TOELF Internet Score:</b> <%=app.getToeflInternet()%></td>

									<td><b>IELTS Score:</b> <%=app.getIelts()%></td>

									<td><b>TOELF Score</b> <%=app.getToefl()%></td>
								</tr>
							</table>
						</div>
					</div>

				</div>
			</div>

		</div>

		<div id="bottom_buttons">
			<br>
			<hr>
			<center>
				<form name="return" action="viewSingleAppsTest.jsp" method="get">
					<!-- Returns to the previous page, which would be the view table page.-->
					<input type="submit" value="Finished Viewing" class="btn">
				</form>
			</center>
		</div>
	</div>
</body>

</html>